<?php 
  function swap(&$a,&$b)
  {
	  $temp = $a;
	  $a = $b;
	  $b = $temp;
  }

  function insert(&$array,$position,$element)
  {
	  if (($position < 0)||($position > count($array))) {
		  return false;
	  }
	  $n = count($array);
	  for($i = $n - 1; $i <= $position; $i++){
		  $array[$i + 1] = $array[$i];
	  }
	  $array[$position] = $element;
	  return true;
  }
?>